<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<c:url value="/" var="baseUrl" />
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
  <head>
   <meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="img/favicon.png">
<title>用户管理</title>
<%@include file="../include/css.jsp"%>
  </head>

  <body>
 
	
  <!-- container section start -->
  <!-- container section start -->
	<section id="container" class="">
		<%@include file="../include/header.jsp"%>
		<%@include file="../include/sidebar.jsp"%>

		<!--main content start-->
		<section id="main-content">
			<section class="wrapper">           
              <!--overview start-->           
              <!--overview start-->
			     
            <!--/.row-->
              
            <!--/.row--><!-- Today status end --><!-- statics end -->
              <!--主显示区域--开始-->
            		<form action="${baseUrl}front/ListUser" method="post">
            		
            	<c:if test="${curUser.id==0}">	
		<table align="center">
			<tr>
				<td>账号:</td>
				<td>
				<input type="hidden" name="startDate" value="${startDate}" />
        <input type="hidden" name="endDate" value="${endDate}" />
				<input type="text" name="account" value="${account}" /> <input
					type="hidden" name="pageNo" value="${paging.pageNo}" /> <input
					type="hidden" name="pageSize" value="${paging.pageSize}" /></td>
				<td><input type="submit" value="搜索" name="find" /></td>
			</tr>
		</table>
		</c:if>
		
<div class="row">
    <div class="col-lg-12">
    <section class="panel">
    <header class="panel-heading">
    <div style="display: inline-block; width: 90%; text-align: center">用户列表</div>
    
    </header>
		<table class="table table-striped table-advance table-hover" style="text-align: center">	
          <tbody > 
			<tr >
			<th style="text-align: center">账号</th>
				<th style="text-align: center">密码</th>
				<th style="text-align: center">地市</th>
				
				<td>
				<c:if test="${curUser.id==0}">
				
				
				<a  class="btn btn-success" href="${baseUrl}front/AddUser"><b>添加用户</b></a>
				</c:if>
								
				</td>
				
			</tr>
		<c:forEach items="${paging.datas}" var="user" varStatus="status">
				<tr>
					<td>${user.account}</td>
					<td>${user.passwd}</td>
					<td>${user.city}</td>
					<td>
					<a class="btn btn-primary" href="${baseUrl}front/ChgUser?id=${user.id}">修改</a>
					<c:if test="${curUser.id==0}">
					<a class="btn btn-danger" href="${baseUrl}front/DelUser?id=${user.id}"
					onClick="return confirm('确实要删除账号 ${user.account}');"
					>删除</a>
					</c:if>
					</td>
					
					
				</tr>
			</c:forEach>
			</tbody>
		</table>
       </section>
    </div>
    </div>
		<table align="center">
			<tr>
				<c:if test="${paging.pageCount>1}">
					<td><input type="submit" value="首页" name="firstPage" /></td>
				</c:if>
				<c:if test="${paging.pageNo>0 && paging.pageNo<=paging.pageCount-1}">
					<td><input type="submit" value="前页" name="previousPage" /></td>
				</c:if>
				<td>第${paging.pageNo+1}页 / 共${paging.pageCount}页</td>
				<c:if test="${paging.pageNo>=0 && paging.pageNo<paging.pageCount-1}">
					<td><input type="submit" value="后页" name="nextPage" /></td>
				</c:if>
				<c:if test="${paging.pageCount>1}">
					<td><input type="submit" value="尾页" name="lastPage" /></td>
				</c:if>
			</tr>
		</table>
		 


	</form>
				
              <!-- project team & activity start -->
             
              <br>
              <br>
              <!-- project team & activity end -->
			  <!--主显示区域--结束-->
          </section>
      </section>
      <!--main content end-->
  </section>
  <!-- container section start -->

   <%@include file="../include/scripts.jsp"%>
<script>
$("#sidebarMyChart").removeClass('active');
$("#sidebarListSameMac").removeClass('active');
$("#sidebarListAvgFlow").removeClass('active');
$("#sidebarScatter").removeClass('active');
$("#sidebarListSigData").removeClass('active');
$("#sidebarListTop10").removeClass('active');
$("#sidebarListAccount").removeClass('active');
$("#sidebarBWListAdmin").removeClass('active');
$("#sidebarListDoc").removeClass('active');
$("#sidebarListUser").addClass('active');
</script>
  </body>
</html>
